package com.beg.cant.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;
import java.lang.Long;
@Data
@Builder
@TableName("orders")
public class Order {
    @TableId(type = IdType.AUTO)
    @Schema(description = "订单ID", example = "1", required = true)
    private Long id;

    @Schema(description = "支付者ID", example = "1", required = true)
    private Long userId;
    @Schema(description = "订单号")
    private String outTradeNo;
    @Schema(description = "状态0-支付中1-支付成功2-失败")
    private int status;

    @Schema(description = "动态ID", example = "1", required = true)
    private Long postsId;

    @Schema(description = "支付金额", example = "50.00", defaultValue = "0.0", required = true)
    private Double amount;

    @Schema(description = "实际金额")
    private Double fee;

    @Schema(description = "支付时间", example = "2025-03-05T10:12:44", readOnly = true)
    private LocalDateTime createdAt;
}